#include <vstcontrols.h>
Public Types | |
enum | Flags { kNoFlags = 0, kDisabled = 1 << 0, kTitle = 1 << 1, kChecked = 1 << 2, kSeparator = 1 << 3 } |
Public Member Functions | |
~CMenuItem () | |
Protected Attributes | |
char * | title |
char * | keycode |
COptionMenu * | submenu |
CBitmap * | icon |
long | flags |
long | keyModifiers |
Constructor | |
| |
CMenuItem (const char *title, long flags=kNoFlags, const char *keycode=0, long keyModifiers=0, CBitmap *icon=0) | |
CMenuItem (const char *title, COptionMenu *submenu, CBitmap *icon=0) | |
CMenuItem (const CMenuItem &item) | |
CMenuItem Methods | |
| |
virtual void | setTitle (const char *title) |
set title of menu item | |
virtual void | setSubmenu (COptionMenu *submenu) |
set submenu of menu item | |
virtual void | setKey (const char *keyCode, long keyModifiers=0) |
set keycode and key modifiers of menu item | |
virtual void | setEnabled (bool state=true) |
set menu item enabled state | |
virtual void | setChecked (bool state=true) |
set menu item checked state | |
virtual void | setIsTitle (bool state=true) |
set menu item title state | |
virtual void | setIsSeparator (bool state=true) |
set menu item separator state | |
virtual void | setIcon (CBitmap *icon) |
set menu item icon | |
bool | isEnabled () const |
returns whether the item is enabled or not | |
bool | isChecked () const |
returns whether the item is checked or not | |
bool | isTitle () const |
returns whether the item is a title item or not | |
bool | isSeparator () const |
returns whether the item is a separator or not | |
const char * | getTitle () const |
returns the title of the item | |
long | getKeyModifiers () const |
returns the key modifiers of the item | |
const char * | getKeycode () const |
returns the keycode of the item | |
COptionMenu * | getSubmenu () const |
returns the submenu of the item | |
CBitmap * | getIcon () const |
returns the icon of the item | |
Reference Counting Methods | |
| |
virtual void | forget () |
decrease refcount and delete object if refcount == 0 | |
virtual void | remember () |
increase refcount | |
long | getNbReference () const |
get refcount | |
Message Methods | |
| |
virtual CMessageResult | notify (CBaseObject *sender, const char *message) |
Defines an item of a VSTGUI::COptionMenu
enum Flags |
CMenuItem | ( | const char * | inTitle, | |
long | inFlags = kNoFlags , |
|||
const char * | inKeycode = 0 , |
|||
long | inKeyModifiers = 0 , |
|||
CBitmap * | inIcon = 0 | |||
) |
CMenuItem constructor.
inTitle | title of item | |
inFlags | CMenuItem::Flags of item | |
inKeycode | keycode of item | |
inKeyModifiers | keymodifiers of item | |
inIcon | icon of item |
CMenuItem | ( | const char * | inTitle, | |
COptionMenu * | inSubmenu, | |||
CBitmap * | inIcon = 0 | |||
) |
CMenuItem constructor.
inTitle | title of item | |
inSubmenu | submenu of item | |
inIcon | icon of item |
~CMenuItem | ( | ) |
virtual void forget | ( | ) | [inline, virtual, inherited] |
decrease refcount and delete object if refcount == 0
Reimplemented in CDrawContext.
CBitmap* getIcon | ( | ) | const [inline] |
returns the icon of the item
const char* getKeycode | ( | ) | const [inline] |
returns the keycode of the item
long getKeyModifiers | ( | ) | const [inline] |
returns the key modifiers of the item
long getNbReference | ( | ) | const [inline, inherited] |
get refcount
COptionMenu* getSubmenu | ( | ) | const [inline] |
returns the submenu of the item
const char* getTitle | ( | ) | const [inline] |
returns the title of the item
bool isChecked | ( | ) | const [inline] |
returns whether the item is checked or not
bool isEnabled | ( | ) | const [inline] |
returns whether the item is enabled or not
bool isSeparator | ( | ) | const [inline] |
returns whether the item is a separator or not
bool isTitle | ( | ) | const [inline] |
returns whether the item is a title item or not
virtual CMessageResult notify | ( | CBaseObject * | sender, | |
const char * | message | |||
) | [inline, virtual, inherited] |
virtual void remember | ( | ) | [inline, virtual, inherited] |
increase refcount
void setChecked | ( | bool | state = true |
) | [virtual] |
set menu item checked state
void setEnabled | ( | bool | state = true |
) | [virtual] |
set menu item enabled state
void setIcon | ( | CBitmap * | icon | ) | [virtual] |
set menu item icon
void setIsSeparator | ( | bool | state = true |
) | [virtual] |
set menu item separator state
void setIsTitle | ( | bool | state = true |
) | [virtual] |
set menu item title state
void setKey | ( | const char * | keyCode, | |
long | keyModifiers = 0 | |||
) | [virtual] |
set keycode and key modifiers of menu item
void setSubmenu | ( | COptionMenu * | submenu | ) | [virtual] |
set submenu of menu item
void setTitle | ( | const char * | title | ) | [virtual] |
set title of menu item
long flags [protected] |
char* keycode [protected] |
long keyModifiers [protected] |
COptionMenu* submenu [protected] |
char* title [protected] |